<?php namespace Home\Model;
use Hdphp\Model\Model;
class UserAddress extends Model
{
	protected $table = 'useraddress';
	/**
	 * 添加收货地址
	 */
	public function addData($user_uid)
	{
		if(!$this->create()) return false;
		$uaaddress = implode(Q('post.uaaddress'), '/');	
		$data = array(
			'uaname'       =>	Q('post.uaname'),
			'uaaddress'    =>	$uaaddress,
			'uaxxaddress'  =>	Q('post.uaxxaddress'),
			'uaphonenumber'=>	Q('post.uaphonenumber'),
			'uatimer'	   =>	Q('post.uatimer'),
			'user_uid'	   =>	$user_uid	
		);
		$this->add($data);
		return true;		
	}
}
